//
//  ZRPicture.m
//  
//
//  Created by 张锐 on 16/3/21.
//
//

#import "ZRPicture.h"
@interface ZRPicture()


@end

@implementation ZRPicture


static NSString * reuseId = @"collectionCell";

/**
 *  构造方法
 */
-(instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout{

    self = [super initWithFrame:frame collectionViewLayout:layout];
    
    if (self) {
        
        self.dataSource = self;
        
        [self registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseId];
        
    }
    
    return self;
}

#pragma mark - 数据源方法
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{

    return 1;
}


- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{

    UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseId forIndexPath:indexPath];
    
    cell.backgroundColor = [UIColor orangeColor];

    return cell;
}

/**
 *  获得大小的方法
 */

@end
